testsuite: Fix an a11y test
authorMatthias Clasen <mclasen@redhat.com>
Fri, 20 Mar 2020 16:09:21 +0000 (12:09 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 20 Mar 2020 16:09:21 +0000 (12:09 -0400)
The derive test wasn't producing TAP, so
running it as part of a tap testsuite wasn't
going well. Fix that.

testsuite/a11y/derive.c

index b9e4d4d41cbc8e1df32534186a2e5e9eb681fda8..a926074f4ab0883fbb49f0c15f385307a3e5d03c 100644 (file)
@@ -57,17 +57,24 @@ my_button_class_init (MyButtonClass *class)
                                         my_button_accessible_get_type ());
 }
 
-int main (int argc, char *argv[])
+static void
+test_derive (void)
 {
   GtkWidget *widget;
   GtkAccessible *accessible;
 
-  gtk_init ();
-
   widget = GTK_WIDGET (g_object_new (my_button_get_type (), NULL));
   accessible = GTK_ACCESSIBLE (gtk_widget_get_accessible (widget));
 
   g_assert (G_TYPE_CHECK_INSTANCE_TYPE (accessible, my_button_accessible_get_type ()));
+}
+
+int
+main (int argc, char *argv[])
+{
+  gtk_test_init (&argc, &argv, NULL);
+
+  g_test_add_func ("/derive", test_derive);
 
-  return 0;
+  return g_test_run ();
 }